home *** CD-ROM | disk | FTP | other *** search
- ; File: EquIP.Txt
- ;
-
-
- Include SysEqu.txt
-
- DBUG equ 1
-
- ; Estimate of size of code
- CODESIZE equ 4000
-
- ; max size of any one cicn is 2048 bytes
- MAX_CICN equ 512
- MAX_CTAB equ 256
- MAX_IMAGE equ 2048
-
- ; Length of an ICON resource.
- ICN_LENGTH equ (32*32)/8
-
- ; Offsets within each ICON/cicn record.
- ICN_OFFSET equ 4
- CICN_OFFSET equ ICN_OFFSET+ICN_LENGTH
-
- ; Extra padding to ensure that we don't get "too close" to the end of the
- ; storage area. It is two bytes to account for word-alignment after copying
- ; the CICN, plus four bytes for the next-pointer in the following record
- ; (which will be set to zero).
- PS_PADDING equ (4 + 2)
-
- ; Private storage record. This is a block which is allocated on the
- ; System Heap and pointed to by A4 during most of the driver's subroutines.
- ; The macro DECLARE defines an A4 offset for a variable in this storage
- ; record and updates mySize, an assembler variable which is used to keep
- ; track of the current total size of the storage record.
-
- mySize set 0
-
- macro DECLARE name,size =
- {name} equ mySize
- mySize set mySize + {size}
- |
-
- DECLARE HeadPointer, 4 ; pointer to first icon in the list.
-
- DECLARE TailPointer, 4 ; pointer to first byte after the end of the
- ; last icon in the list. This is the same as
- ; HeadPointer if no icons are present.
-
- DECLARE EndOfStorage, 4 ; pointer to first byte past end of our
- ; icon-storage area.
-
- DECLARE ResType, 4 ; Type of GetResource
- DECLARE ResID, 2 ; ID of GetResource
-
- DECLARE cicnSize, 4 ; Size of cicn resource
-
- DECLARE icnHandle, 4 ; Temp save for ICN# handle
-
- DECLARE cicnHandle, 4 ; Temp save for cicn handle
-
- DECLARE scratchCicn, 4 ; handle to cicn scratch space
- DECLARE scratchCtab, 4 ; handle to scratch color table
- DECLARE scratchImage, 4 ; handle to scratch cicn image space
-
- ; The following are used by PCBPlotIt
- ;
- DECLARE pcbHeight, 2 ; height of cicn PMap
- DECLARE pcbBmapOffset, 2 ; offset for BMapData
- DECLARE pcbCicnLength, 2 ; length of PMap + icon + mask
- DECLARE pcbCTabLength, 2 ; length of cicn color table
- DECLARE pcbImageLength, 2 ; length of cicn image data
-
- DECLARE scratchID, 2 ; space for ID from GetResInfo
- DECLARE scratchType, 4 ; space for type from GetResInfo
- DECLARE scratchName, 256 ; space for name from GetResInfo
-
- DECLARE curPort, 4 ; place to get current port
-
- DECLARE curForeColor, 6 ; Current RGBForeColor
- DECLARE curBackColor, 6 ; Current RGBBackColor
-
- DECLARE selected, 2 ; Flag: is current icon being drawn
- ; "selected" in the Finder?
-
- ; Init icon ID's
- goodIconID equ 128
- ramFullIconID equ 129
- badIconID equ 130
-
- Error1ID equ 131 ; ROM85 negative
- Error2ID equ 132 ; Color QD bit in ROM85 is clear
- Error3ID equ 133 ; User has mouse button or shift key down
- Error4ID equ 134 ; Can't load 'PaTc' resource
- Error5ID equ 135 ; PaTc returned an error
- Error6ID equ 136 ; Couldn't allocate private storage record,
- ; scratch cicn, scratch ctab, or scratch
- ; cicn image
- Error7ID equ 137 ; Couldn't load 'sysz' resource
- Error8ID equ 138 ; Illegal (too small) 'sysz' value
- Error9ID equ 139 ; Couldn't allocate main cicn buffer
-
- showInitID equ -4048 ; ID of ShowInit code resource
-
- ; *** end of private storage record ***
- ; mySize is now set to the total size of the private storage record
-
- ; This is the extra amount that the 'sysz' resource should have, over and
- ; above the size of icon data.
- SYSZ_EXCESS equ CODESIZE+MAX_CICN+MAX_CTAB+MAX_IMAGE+mySize
-
- ; This is the extra amount of cicn space we'd like to have after
- ; we're done loading the ones in the INIT file itself.
- ;
- CICN_EXTRA equ 10000
-
- ;
- ; trap numbers for patch.asm
- ;
- GRTrap equ $1A0 ; GetResource
- PITrap equ $14B ; PlotIcon
- CBTrap equ $EC ; CopyBits
-
- ; end of EquIP.txt
-
-